Compare commits
156 Commits
Author | SHA1 | Date | |
---|---|---|---|
47bc02b2ff | |||
340be4bae3 | |||
eb5172f4b5 | |||
501f988666 | |||
fcbbaf4485 | |||
6d222b71c6 | |||
8c05254a68 | |||
d09ea04fa1 | |||
a8e9d4f207 | |||
af4a806e3f | |||
16557f9975 | |||
69640365f8 | |||
a58906ceb3 | |||
02737307ff | |||
834d03b577 | |||
dca7c3f86f | |||
7fc552632e | |||
e3e587fc74 | |||
8075003e60 | |||
257319f9ff | |||
e3fed98ecb | |||
26d444c616 | |||
9a4f39b738 | |||
29a4e5c50b | |||
337776105d | |||
7b838f330f | |||
8753ae354b | |||
5f755b9822 | |||
0a3c486476 | |||
8fbdc45648 | |||
719c99afa1 | |||
8129b73d8a | |||
9289d934b0 | |||
94e9bb406b | |||
31c81d432c | |||
69acadf967 | |||
900bec6211 | |||
822ba1edfa | |||
d21363325d | |||
3377813f5d | |||
a426abf017 | |||
4e9967557e | |||
636c96ad25 | |||
e2618dc35c | |||
f215da3b7c | |||
4f4602abd5 | |||
b99e09ee0e | |||
284e29d4a1 | |||
ae8458e12d | |||
c94c6fcc25 | |||
cc35aaadbf | |||
fd32861c9f | |||
4f087591a8 | |||
e99b7f240a | |||
2224a768d5 | |||
2893038fda | |||
1fa84ea83c | |||
33c453d771 | |||
e807bb7e37 | |||
ac2424fec6 | |||
2693d6fd84 | |||
f75e66dd19 | |||
aa15b64f55 | |||
c25dfe543b | |||
b31ebe789d | |||
45d60214f4 | |||
9baafef968 | |||
1a831a01b7 | |||
de4d28cd60 | |||
f73e69f56d | |||
cd0043de8f | |||
b0e948c380 | |||
36ae585468 | |||
b9b8ff8302 | |||
c70ebd4a0e | |||
2a4c746718 | |||
b108524314 | |||
d4d8b0c6d3 | |||
8757a19375 | |||
5fc4e331bd | |||
81b5ae9bdd | |||
73e3053e25 | |||
319d9aa7b9 | |||
e9f187f612 | |||
72ec742d2c | |||
6dbc1b800f | |||
54593975bf | |||
abc101c122 | |||
ac74d106d6 | |||
93737eccc9 | |||
7bff385840 | |||
696bf80375 | |||
c52ad5c38e | |||
041f60f9a9 | |||
2d8902c884 | |||
742ff91cf8 | |||
5ef5a79fd9 | |||
eac3809266 | |||
afafce0a5e | |||
06cb283604 | |||
e44cbf7556 | |||
4cd92cac1c | |||
c035a37249 | |||
1d58530e79 | |||
4afbade6d1 | |||
551489645a | |||
f95f93b0fc | |||
8a429fce33 | |||
5d6b291845 | |||
4bc57c8d46 | |||
18ae0f61ab | |||
a1b16b8227 | |||
d5374b7e01 | |||
34374d2e2e | |||
977f667da9 | |||
a9e9c9acc5 | |||
53f46893ce | |||
b1235baf42 | |||
c5f544cd96 | |||
cba2b5645f | |||
f0e219a1c8 | |||
0d9399234d | |||
7d417b78eb | |||
67df06eb44 | |||
1080025973 | |||
aa73362674 | |||
8c9dea0d0a | |||
be9fcbd503 | |||
49596b0692 | |||
fb11330eab | |||
6788a5eb27 | |||
3a3b4d155e | |||
2121931e34 | |||
7cbbcdc5d4 | |||
654dc267db | |||
ae38bdd5dc | |||
abf6504903 | |||
3e1ac7a38f | |||
be42ea306b | |||
900e79febe | |||
fec2323089 | |||
a8991722bc | |||
62e2cb9286 | |||
113d3d6001 | |||
8946aace5b | |||
0a03fc512c | |||
30b0600ea2 | |||
4443fa8a32 | |||
7836906f3e | |||
9ae4d01e33 | |||
73bddf0ea6 | |||
1919644934 | |||
092ef661af | |||
21276de7d5 | |||
c060876692 | |||
1875659df0 |
2
.clangd
2
.clangd
@ -1,4 +1,4 @@
|
||||
CompileFlags:
|
||||
Add: [-Wno-unknown-attributes, -Wno-maybe-uninitialized, -Wno-unknown-warning-option]
|
||||
Remove: [-W*, -mcall-prologues]
|
||||
Remove: [-W*, -mmcu=*, -mcpu=*, -mfpu=*, -mfloat-abi=*, -mno-unaligned-access, -mno-thumb-interwork, -mcall-prologues]
|
||||
Compiler: clang
|
||||
|
@ -4,39 +4,39 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
# We recommend you to keep these unchanged
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[{*.yaml,*.yml}] # To match GitHub Actions formatting
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
indent_size = 4
|
||||
|
||||
[{qmk,*.py}]
|
||||
charset = utf-8
|
||||
max_line_length = 200
|
||||
|
||||
# Make these match what we have in .gitattributes
|
||||
[*.mk]
|
||||
end_of_line = lf
|
||||
[{Makefile,*.mk}]
|
||||
indent_style = tab
|
||||
|
||||
[Makefile]
|
||||
end_of_line = lf
|
||||
indent_style = tab
|
||||
|
||||
[*.sh]
|
||||
end_of_line = lf
|
||||
|
||||
# The gitattributes file will handle the line endings conversion properly according to the operating system settings for other files
|
||||
|
||||
|
||||
# We don't have gitattributes properly for these
|
||||
# So if the user have for example core.autocrlf set to true
|
||||
# the line endings would be wrong.
|
||||
# Don't override anything in `lib/`...
|
||||
[lib/**]
|
||||
indent_style = unset
|
||||
indent_size = unset
|
||||
tab_width = unset
|
||||
end_of_line = unset
|
||||
charset = unset
|
||||
spelling_language = unset
|
||||
trim_trailing_whitespace = unset
|
||||
insert_final_newline = unset
|
||||
|
||||
# ...except QMK's `lib/python`.
|
||||
[{*.py,lib/python/**.py}]
|
||||
end_of_line = lf
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
max_line_length = 200
|
||||
|
123
.github/workflows/ci_build_major_branch.yml
vendored
Normal file
123
.github/workflows/ci_build_major_branch.yml
vendored
Normal file
@ -0,0 +1,123 @@
|
||||
name: CI Build Major Branch
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: write
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, develop]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
type: choice
|
||||
description: "Branch to build"
|
||||
options: [master, develop]
|
||||
|
||||
env:
|
||||
# https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#usage-limits
|
||||
# We've decreased it from 20 to 15 to allow for other GHA to run unimpeded
|
||||
CONCURRENT_JOBS: 15
|
||||
|
||||
# Ensure we only have one build running at a time, cancelling any active builds if a new commit is pushed to the respective branch
|
||||
concurrency:
|
||||
group: ci_build-${{ github.event.inputs.branch || github.ref_name }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
determine_concurrency:
|
||||
name: "Determine concurrency"
|
||||
if: github.repository == 'qmk/qmk_firmware'
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/qmk/qmk_cli
|
||||
|
||||
outputs:
|
||||
slice_length: ${{ steps.generate_slice_length.outputs.slice_length }}
|
||||
|
||||
steps:
|
||||
- name: Install prerequisites
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y jq
|
||||
|
||||
- name: Disable safe.directory check
|
||||
run: |
|
||||
git config --global --add safe.directory '*'
|
||||
|
||||
- name: Checkout QMK Firmware
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Determine concurrency
|
||||
id: generate_slice_length
|
||||
run: |
|
||||
target_count=$( {
|
||||
qmk find -km default 2>/dev/null
|
||||
qmk find -km via 2>/dev/null
|
||||
} | sort | uniq | wc -l)
|
||||
slice_length=$((target_count / ($CONCURRENT_JOBS - 1))) # Err on the side of caution as we're splitting default and via
|
||||
echo "slice_length=$slice_length" >> $GITHUB_OUTPUT
|
||||
|
||||
build_targets:
|
||||
name: "Compile keymap ${{ matrix.keymap }}"
|
||||
needs: determine_concurrency
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
keymap: [default, via]
|
||||
uses: ./.github/workflows/ci_build_major_branch_keymap.yml
|
||||
with:
|
||||
branch: ${{ inputs.branch || github.ref_name }}
|
||||
keymap: ${{ matrix.keymap }}
|
||||
slice_length: ${{ needs.determine_concurrency.outputs.slice_length }}
|
||||
secrets: inherit
|
||||
|
||||
rollup_tasks:
|
||||
name: "Consolidation"
|
||||
needs: build_targets
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Download firmwares
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: firmware-*
|
||||
path: firmwares
|
||||
merge-multiple: true
|
||||
|
||||
- name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/${{ github.sha }}
|
||||
uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks --delete
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }}
|
||||
AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }}
|
||||
AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }}
|
||||
SOURCE_DIR: firmwares
|
||||
DEST_DIR: ${{ inputs.branch || github.ref_name }}/${{ github.sha }}
|
||||
|
||||
- name: Upload to https://ci.qmk.fm/${{ inputs.branch || github.ref_name }}/latest
|
||||
uses: jakejarvis/s3-sync-action@master
|
||||
with:
|
||||
args: --acl public-read --follow-symlinks --delete
|
||||
env:
|
||||
AWS_S3_BUCKET: ${{ vars.CI_QMK_FM_SPACES_BUCKET }}
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.CI_QMK_FM_SPACES_KEY }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.CI_QMK_FM_SPACES_SECRET }}
|
||||
AWS_REGION: ${{ vars.CI_QMK_FM_SPACES_REGION }}
|
||||
AWS_S3_ENDPOINT: ${{ vars.CI_QMK_FM_SPACES_ENDPOINT }}
|
||||
SOURCE_DIR: firmwares
|
||||
DEST_DIR: ${{ inputs.branch || github.ref_name }}/latest
|
||||
|
||||
- name: Check if failure marker file exists
|
||||
id: check_failure_marker
|
||||
uses: andstor/file-existence-action@v3
|
||||
with:
|
||||
files: firmwares/.failed
|
||||
|
||||
- name: Fail build if needed
|
||||
if: steps.check_failure_marker.outputs.files_exists == 'true'
|
||||
run: |
|
||||
# Exit with failure if the compilation stage failed
|
||||
exit 1
|
181
.github/workflows/ci_build_major_branch_keymap.yml
vendored
Normal file
181
.github/workflows/ci_build_major_branch_keymap.yml
vendored
Normal file
@ -0,0 +1,181 @@
|
||||
name: CI Build Major Branch Keymap
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: write
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
branch:
|
||||
type: string
|
||||
required: true
|
||||
keymap:
|
||||
type: string
|
||||
required: true
|
||||
slice_length:
|
||||
type: string
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
generate_targets:
|
||||
name: "Generate targets (${{ inputs.keymap }})"
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/qmk/qmk_cli
|
||||
|
||||
outputs:
|
||||
targets: ${{ steps.generate_targets.outputs.targets }}
|
||||
|
||||
steps:
|
||||
- name: Install prerequisites
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y jq
|
||||
|
||||
- name: Disable safe.directory check
|
||||
run: |
|
||||
git config --global --add safe.directory '*'
|
||||
|
||||
- name: Checkout QMK Firmware
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Generate build targets
|
||||
id: generate_targets
|
||||
run: |
|
||||
{ # Intentionally use `shuf` here so that we share manufacturers across all build groups -- some have a lot of ARM-based boards which inherently take longer
|
||||
counter=0
|
||||
echo -n '{'
|
||||
qmk find -km ${{ inputs.keymap }} 2>/dev/null | sort | uniq | shuf | xargs -L${{ inputs.slice_length }} | while IFS=$'\n' read target ; do
|
||||
if [ $counter -gt 0 ]; then
|
||||
echo -n ','
|
||||
fi
|
||||
counter=$((counter+1))
|
||||
printf "\"group %02d\":{" $counter
|
||||
echo -n '"targets":"'
|
||||
echo $target | tr ' ' '\n' | sort | uniq | xargs echo -n
|
||||
echo -n '"}'
|
||||
done
|
||||
echo -n '}'
|
||||
} | sed -e 's@\n@@g' > targets.json
|
||||
|
||||
# Output the target keys as a variable
|
||||
echo "targets=$(jq -c 'keys' targets.json)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Upload targets json
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: targets-${{ inputs.keymap }}
|
||||
path: targets.json
|
||||
|
||||
build_targets:
|
||||
name: "Compile ${{ matrix.target }} (${{ inputs.keymap }})"
|
||||
needs: generate_targets
|
||||
runs-on: ubuntu-latest
|
||||
container: ghcr.io/qmk/qmk_cli
|
||||
continue-on-error: true
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
target: ${{ fromJson(needs.generate_targets.outputs.targets) }}
|
||||
|
||||
steps:
|
||||
- name: Install prerequisites
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y jq
|
||||
|
||||
- name: Disable safe.directory check
|
||||
run: |
|
||||
git config --global --add safe.directory '*'
|
||||
|
||||
- name: Checkout QMK Firmware
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get target definitions
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: targets-${{ inputs.keymap }}
|
||||
path: .
|
||||
|
||||
- name: Deploy submodules
|
||||
run: |
|
||||
qmk git-submodule -f
|
||||
|
||||
- name: Dump targets
|
||||
run: |
|
||||
jq -r '.["${{ matrix.target }}"].targets' targets.json | tr ' ' '\n' | sort
|
||||
|
||||
- name: Build targets
|
||||
continue-on-error: true
|
||||
run: |
|
||||
export NCPUS=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
|
||||
qmk mass-compile -t -j $NCPUS -e DUMP_CI_METADATA=yes $(jq -r '.["${{ matrix.target }}"].targets' targets.json) || touch .failed
|
||||
|
||||
- name: Upload binaries
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: firmware-${{ inputs.keymap }}-${{ matrix.target }}
|
||||
if-no-files-found: ignore
|
||||
path: |
|
||||
*.bin
|
||||
*.hex
|
||||
*.uf2
|
||||
.build/failed.*
|
||||
.failed
|
||||
|
||||
- name: Fail build if any group failed
|
||||
run: |
|
||||
# Exit with failure if the compilation stage failed
|
||||
[ ! -f .failed ] || exit 1
|
||||
|
||||
repack_firmware:
|
||||
if: always()
|
||||
name: "Repack artifacts"
|
||||
needs: build_targets
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout QMK Firmware
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download firmwares
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: firmware-${{ inputs.keymap }}-*
|
||||
path: .
|
||||
merge-multiple: true
|
||||
|
||||
- name: Upload all firmwares
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: firmware-${{ inputs.keymap }}
|
||||
if-no-files-found: ignore
|
||||
path: |
|
||||
*.bin
|
||||
*.hex
|
||||
*.uf2
|
||||
.build/failed.*
|
||||
.failed
|
||||
|
||||
- name: Generate output logs
|
||||
run: |
|
||||
# Generate the step summary markdown
|
||||
./util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true
|
||||
# Truncate to a maximum of 1MB to deal with GitHub workflow limit
|
||||
truncate --size='<960K' $GITHUB_STEP_SUMMARY || true
|
||||
|
||||
- name: Delete temporary build artifacts
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: |
|
||||
firmware-${{ inputs.keymap }}-*
|
||||
targets-${{ inputs.keymap }}
|
||||
|
||||
- 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 ${{ inputs.branch || github.ref_name }} --keymap ${{ inputs.keymap }} --url ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
74
.github/workflows/ci_builds.yml
vendored
74
.github/workflows/ci_builds.yml
vendored
@ -1,74 +0,0 @@
|
||||
name: CI Builds
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, develop]
|
||||
workflow_dispatch:
|
||||
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
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
keymap: [default, via]
|
||||
|
||||
container: ghcr.io/qmk/qmk_cli
|
||||
|
||||
steps:
|
||||
- name: Disable safe.directory check
|
||||
run : git config --global --add safe.directory '*'
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
ref: ${{ github.event.inputs.branch || github.ref }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip3 install -r requirements.txt
|
||||
|
||||
- name: Run `qmk mass-compile` (keymap ${{ matrix.keymap }})
|
||||
run: |
|
||||
export NCPUS=$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
|
||||
qmk mass-compile -t -j $NCPUS -km ${{ matrix.keymap }} -e DUMP_CI_METADATA=yes || touch .failed
|
||||
# Generate the step summary markdown
|
||||
./util/ci/generate_failure_markdown.sh > $GITHUB_STEP_SUMMARY || true
|
||||
# Truncate to a maximum of 1MB to deal with GitHub workflow limit
|
||||
truncate --size='<960K' $GITHUB_STEP_SUMMARY || true
|
||||
# Exit with failure if the compilation stage failed
|
||||
[ ! -f .failed ] || exit 1
|
||||
|
||||
- name: 'Upload artifacts'
|
||||
uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
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 }}
|
2
.github/workflows/docs.yml
vendored
2
.github/workflows/docs.yml
vendored
@ -37,7 +37,7 @@ jobs:
|
||||
qmk --verbose generate-docs
|
||||
|
||||
- name: Deploy
|
||||
uses: JamesIves/github-pages-deploy-action@v4.5.0
|
||||
uses: JamesIves/github-pages-deploy-action@v4.6.0
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BASE_BRANCH: master
|
||||
|
4
.github/workflows/format.yml
vendored
4
.github/workflows/format.yml
vendored
@ -35,7 +35,9 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: file_changes
|
||||
uses: tj-actions/changed-files@v42
|
||||
uses: tj-actions/changed-files@v44
|
||||
with:
|
||||
use_rest_api: true
|
||||
|
||||
- name: Run qmk formatters
|
||||
shell: 'bash {0}'
|
||||
|
2
.github/workflows/format_push.yml
vendored
2
.github/workflows/format_push.yml
vendored
@ -47,7 +47,7 @@ jobs:
|
||||
git config user.email 'hello@qmk.fm'
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
if: ${{ github.repository == 'qmk/qmk_firmware'}}
|
||||
with:
|
||||
token: ${{ secrets.QMK_BOT_TOKEN }}
|
||||
|
14
.github/workflows/lint.yml
vendored
14
.github/workflows/lint.yml
vendored
@ -27,7 +27,9 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: file_changes
|
||||
uses: tj-actions/changed-files@v42
|
||||
uses: tj-actions/changed-files@v44
|
||||
with:
|
||||
use_rest_api: true
|
||||
|
||||
- name: Print info
|
||||
run: |
|
||||
@ -62,10 +64,12 @@ jobs:
|
||||
|
||||
qmk format-text ${{ steps.file_changes.outputs.all_changed_files}} || true
|
||||
for file in ${{ steps.file_changes.outputs.all_changed_files}}; do
|
||||
if ! git diff --quiet $file; then
|
||||
echo "File '${file}' Requires Formatting"
|
||||
echo "::error file=${file}::Requires Formatting"
|
||||
exit_code=$(($exit_code + 1))
|
||||
if [[ -f $file ]]; then
|
||||
if ! git diff --quiet $file; then
|
||||
echo "File '${file}' Requires Formatting"
|
||||
echo "::error file=${file}::Requires Formatting"
|
||||
exit_code=$(($exit_code + 1))
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
2
.github/workflows/regen_push.yml
vendored
2
.github/workflows/regen_push.yml
vendored
@ -34,7 +34,7 @@ jobs:
|
||||
git config user.email 'hello@qmk.fm'
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
if: ${{ github.repository == 'qmk/qmk_firmware'}}
|
||||
with:
|
||||
token: ${{ secrets.QMK_BOT_TOKEN }}
|
||||
|
@ -5,8 +5,10 @@ ifneq ($(findstring yes, $(CTPC)$(CONVERT_TO_PROTON_C)),)
|
||||
$(call CATASTROPHIC_ERROR,The `CONVERT_TO_PROTON_C` and `CTPC` options are now deprecated. `CONVERT_TO=proton_c` should be used instead.)
|
||||
endif
|
||||
|
||||
# TODO: opt in rather than assume everything uses a pro micro
|
||||
PIN_COMPATIBLE ?= promicro
|
||||
ifneq (,$(filter $(MCU),atmega32u4))
|
||||
# TODO: opt in rather than assume everything uses a pro micro
|
||||
PIN_COMPATIBLE ?= promicro
|
||||
endif
|
||||
|
||||
# Remove whitespace from any rule.mk provided vars
|
||||
# - env cannot be overwritten but cannot have whitespace anyway
|
||||
@ -16,6 +18,10 @@ ifneq ($(CONVERT_TO),)
|
||||
# stash so we can overwrite env provided vars if needed
|
||||
ACTIVE_CONVERTER=$(CONVERT_TO)
|
||||
|
||||
ifeq ($(PIN_COMPATIBLE),)
|
||||
$(call CATASTROPHIC_ERROR,Converting to '$(CONVERT_TO)' not possible!)
|
||||
endif
|
||||
|
||||
# glob to search each platfrorm and/or check for valid converter
|
||||
CONVERTER := $(wildcard $(PLATFORM_PATH)/*/converters/$(PIN_COMPATIBLE)_to_$(CONVERT_TO)/)
|
||||
ifeq ($(CONVERTER),)
|
||||
|
@ -335,5 +335,9 @@
|
||||
"key": "ES_CIRC",
|
||||
"label": "^",
|
||||
}
|
||||
"ALGR(KC_NUHS)": {
|
||||
"key": "ES_GRV",
|
||||
"label": "`",
|
||||
}
|
||||
}
|
||||
}
|
261
docs/__capabilities.md
Normal file
261
docs/__capabilities.md
Normal file
@ -0,0 +1,261 @@
|
||||
# Documentation Capabilities
|
||||
|
||||
This page lays out the capabilities used by the QMK Firmware documentation, in order to aid future transitions to other page generators. Focuses mainly on things other than normal Markdown, as it's assumed that markdown generators should still function accordingly.
|
||||
|
||||
## Overall capabilities
|
||||
|
||||
Unrelated to styling, high-level tech.
|
||||
|
||||
* I18n -- translations to other languages: [_langs.md](_langs.md)
|
||||
* Sidebar -- listing of pages by category: [_summary.md](_summary.md)
|
||||
* Title anchors -- `:id=some-anchor-name`, used for direct linking to sections
|
||||
* Links to anchors:
|
||||
* Style 1: [early initialization](platformdev_chibios_earlyinit.md?id=board-init)
|
||||
* Style 2: [early initialization](platformdev_chibios_earlyinit.md#board-init)
|
||||
* Links to anchors on the same page, i.e. [Emoji](#emoji)
|
||||
* Specifying CNAME for root domain -- `docs.qmk.fm`
|
||||
* Moved pages, see `index.html`
|
||||
* Text search
|
||||
* Footnotes [like this][1]
|
||||
|
||||
<!-- Comments should not show up -->
|
||||
|
||||
<!-- Nor should
|
||||
multiline
|
||||
|
||||
comments with
|
||||
|
||||
newlines show up -->
|
||||
|
||||
|
||||
### Dividing lines
|
||||
|
||||
---
|
||||
|
||||
<hr>
|
||||
|
||||
<hr/>
|
||||
|
||||
### Images
|
||||
|
||||

|
||||
|
||||
<img src="gitbook/images/color-wheel.svg" alt="HSV Color Wheel" width="250"/>
|
||||
|
||||
### Lists
|
||||
|
||||
Newlines with `<br>`:
|
||||
|
||||
Line one<br>
|
||||
Line two<br/>
|
||||
Line three
|
||||
|
||||
Nested dotted:
|
||||
|
||||
* The PR is complete and ready to merge
|
||||
* GitHub checks for the PR are green whenever possible
|
||||
* A "red" check may be disregarded by maintainers if the items flagged are unrelated to the change proposed in the PR
|
||||
* Modifications to existing files should not need to add license headers to pass lint, for instance.
|
||||
* If it's not directly related to your PR's functionality, prefer avoiding making a change.
|
||||
|
||||
Nested dashed:
|
||||
|
||||
- The PR is complete and ready to merge
|
||||
- GitHub checks for the PR are green whenever possible
|
||||
- A "red" check may be disregarded by maintainers if the items flagged are unrelated to the change proposed in the PR
|
||||
- Modifications to existing files should not need to add license headers to pass lint, for instance.
|
||||
- If it's not directly related to your PR's functionality, prefer avoiding making a change.
|
||||
|
||||
Nested numbered:
|
||||
|
||||
1. The PR is complete and ready to merge
|
||||
1. GitHub checks for the PR are green whenever possible
|
||||
1. A "red" check may be disregarded by maintainers if the items flagged are unrelated to the change proposed in the PR
|
||||
1. Modifications to existing files should not need to add license headers to pass lint, for instance.
|
||||
1. If it's not directly related to your PR's functionality, prefer avoiding making a change.
|
||||
|
||||
Nested mixed:
|
||||
|
||||
1. Add it to the schema in `data/schemas/keyboards.jsonschema`
|
||||
1. Add a mapping in `data/maps`
|
||||
1. (optional and discouraged) Add code to extract/generate it to:
|
||||
* `lib/python/qmk/info.py`
|
||||
* `lib/python/qmk/cli/generate/config_h.py`
|
||||
* `lib/python/qmk/cli/generate/rules_mk.py`
|
||||
|
||||
### Emoji :id=emoji
|
||||
|
||||
#### Direct:
|
||||
|
||||
👍🎉 First off, thanks for taking the time to read this and contribute! 🎉👍
|
||||
|
||||
#### As colon-name-colon:
|
||||
|
||||
:heavy_check_mark: : works and was tested
|
||||
|
||||
:o: : does not apply
|
||||
|
||||
:x: : not supported by MCU
|
||||
|
||||
### XML Entities
|
||||
|
||||
[`clueboard`](https://github.com/qmk/qmk_firmware/tree/master/keyboards/clueboard) ← This is the organization folder, there's no `rules.mk` file
|
||||
|
||||
1–4
|
||||
|
||||
Command+<code>`</code>
|
||||
|
||||
## Styling
|
||||
|
||||
### CSS-ish
|
||||
|
||||
<b style="font-size:150%">This is 150% of normal sizing, and bold!</b>
|
||||
|
||||
|
||||
### Tables
|
||||
|
||||
| Column A | Column B |
|
||||
|----------|----------|
|
||||
| Left | Right |
|
||||
|
||||
### Indented sections
|
||||
|
||||
> Indent without any sort of marker
|
||||
|
||||
?> Query, this?
|
||||
|
||||
!> Notification, damnit!
|
||||
|
||||
### Keyboard keys
|
||||
|
||||
<kbd>,</kbd>
|
||||
|
||||
<kbd>Right Alt</kbd>+<kbd>Right Shift</kbd>
|
||||
|
||||
1. Click <kbd>File</kbd> > <kbd>New</kbd> > <kbd>Makefile Project with Existing Code</kbd>
|
||||
|
||||
1. Click <kbd><kbd>File</kbd> > <kbd>Preferences ></kbd> > <kbd>Settings</kbd> </kbd>
|
||||
|
||||
1. Hit Ctrl-<code>`</code> (Grave) to bring up the terminal or go to <kbd><kbd>View</kbd> > <kbd>Terminal</kbd></kbd> (command `workbench.action.terminal.toggleTerminal`). A new terminal will be opened if there isn‘t one already.
|
||||
|
||||
This should start the terminal in the workspace's folder (so the `qmk_firmware` folder), and then you can compile your keyboard.
|
||||
|
||||
|
||||
### Code Blocks
|
||||
|
||||
Inline code with tag: <code>test</code>
|
||||
|
||||
Inline code with backticks: `test`
|
||||
|
||||
This is preformatted
|
||||
Indented by 4 spaces
|
||||
The letters lined up
|
||||
|
||||
```c
|
||||
int c_code(void) {
|
||||
return -1;
|
||||
}
|
||||
```
|
||||
|
||||
```makefile
|
||||
ifeq ($(BUILD),)
|
||||
CHUNDER_REQUIRED = yes
|
||||
endif
|
||||
```
|
||||
|
||||
```python
|
||||
from pathlib import Path
|
||||
|
||||
p = Path('/path/to/qmk_firmware')
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"a": "b",
|
||||
"c": 4,
|
||||
"d": {
|
||||
"e": [
|
||||
0, 1, 2, 3
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
```diff
|
||||
#undef RGBLIGHT_LED_COUNT
|
||||
+#undef RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
+#undef RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_LED_COUNT 12
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
```
|
||||
|
||||
Indented code as part of a list:
|
||||
|
||||
* [QMK Toolbox](https://github.com/qmk/qmk_toolbox/releases) (recommended GUI)
|
||||
* [Teensy Loader](https://www.pjrc.com/teensy/loader.html)
|
||||
* [Teensy Loader Command Line](https://www.pjrc.com/teensy/loader_cli.html) / `:teensy` target in QMK (recommended command line)
|
||||
```
|
||||
teensy_loader_cli -v -mmcu=<mcu> <filename>
|
||||
```
|
||||
|
||||
|
||||
### Sub/Superscript
|
||||
|
||||
<sub>This is subscripted, apparently.</sub>
|
||||
|
||||
<sup>This is superscripted, apparently.</sup>
|
||||
|
||||
I<sup>2</sup>C
|
||||
|
||||
T<sub>0H</sub>, T<sub>0L</sub>
|
||||
|
||||
### Tabs
|
||||
|
||||
Tabs are based on section headers, with `**` enclosing the tab title.
|
||||
|
||||
<!-- tabs:start -->
|
||||
|
||||
#### ** Tab one **
|
||||
|
||||
Content one
|
||||
|
||||
<!-- tabs:start -->
|
||||
|
||||
##### ** Nested one **
|
||||
|
||||
Nested content one
|
||||
|
||||
##### ** Nested two **
|
||||
|
||||
Nested content two
|
||||
|
||||
<!-- tabs:end -->
|
||||
|
||||
#### ** Tab two **
|
||||
|
||||
Content two
|
||||
|
||||
#### ** Tab three **
|
||||
|
||||
Content three
|
||||
|
||||
<!-- tabs:end -->
|
||||
|
||||
## Details sections
|
||||
|
||||
Expandable:
|
||||
|
||||
<details>
|
||||
<summary>Some summary text that shows up before expanding</summary>
|
||||
|
||||
!> Embedded notification!
|
||||
|
||||
This is some inner content.
|
||||
</details>
|
||||
|
||||
[1]: https://en.wikipedia.org/wiki/Eclipse_(software)
|
||||
|
||||
## Embed
|
||||
|
||||
[example embed](__capabilities_inc.md ':include')
|
1
docs/__capabilities_inc.md
Normal file
1
docs/__capabilities_inc.md
Normal file
@ -0,0 +1 @@
|
||||
Lorem ipsum dolor sit amet.
|
@ -322,6 +322,18 @@ Creates a keymap.json from a keymap.c.
|
||||
qmk c2json -km KEYMAP -kb KEYBOARD [-q] [--no-cpp] [-o OUTPUT] filename
|
||||
```
|
||||
|
||||
**Examples**:
|
||||
|
||||
```
|
||||
qmk c2json -km default -kb handwired/dactyl_promicro
|
||||
```
|
||||
|
||||
or with filename:
|
||||
|
||||
```
|
||||
qmk c2json keyboards/handwired/dactyl_promicro/keymaps/default/keymap.c
|
||||
```
|
||||
|
||||
## `qmk lint`
|
||||
|
||||
Checks over a keyboard and/or keymap and highlights common errors, problems, and anti-patterns.
|
||||
|
@ -45,4 +45,4 @@ Eg, if you wanted to set the "Adjust" layer to be layer 5, you'd add this to you
|
||||
| `get_tri_layer_upper_layer()` | Gets the current "upper" layer. |
|
||||
| `get_tri_layer_adjust_layer()` | Gets the current "adjust" layer. |
|
||||
|
||||
!> Note: these settings are not persisent, and will be reset to the default on power loss or power cycling of the controller.
|
||||
!> Note: these settings are not persistent, and will be reset to the default on power loss or power cycling of the controller.
|
||||
|
@ -236,7 +236,7 @@ Flashing sequence:
|
||||
|
||||
## STM32/APM32 DFU
|
||||
|
||||
All STM32 and APM32 MCUs, except for F103 (see the [STM32duino section](#stm32duino)) come preloaded with a factory bootloader that cannot be modified nor deleted.
|
||||
All USB-capable STM32 and APM32 MCUs, except for a small handful (such as STM32F103 -- see the [STM32duino section](#stm32duino)) come preloaded with a factory bootloader that cannot be modified nor deleted.
|
||||
|
||||
To ensure compatibility with the STM32-DFU bootloader, make sure this block is present in your `rules.mk` (optionally with `apm32-dfu` instead):
|
||||
|
||||
@ -464,4 +464,4 @@ CLI Flashing sequence:
|
||||
3. Flash via QMK CLI eg. `qmk flash --keyboard handwired/onekey/rpi_pico --keymap default`
|
||||
4. Wait for the keyboard to become available
|
||||
|
||||
<sup>1</sup>: This works only if QMK was compiled with `RP2040_BOOTLOADER_DOUBLE_TAP_RESET` defined.
|
||||
<sup>1</sup>: This works only if the controller has been flashed with QMK Firmware with `RP2040_BOOTLOADER_DOUBLE_TAP_RESET` defined.
|
||||
|
@ -4,7 +4,7 @@ This page attempts to explain the basic information you need to know to work wit
|
||||
|
||||
## Basic QMK Structure
|
||||
|
||||
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk_core` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk_core` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `keyboards` folder.
|
||||
|
||||
### Userspace Structure
|
||||
|
||||
|
@ -175,7 +175,7 @@ As you move along, be sure that the controller is staying in place - recutting a
|
||||
|
||||
From here, you should have a working keyboard once you program a firmware.
|
||||
|
||||
Simple firmware can be created easily using the [Keyboard Firmware Builder](https://kbfirmware.com/) website. Recreate your layout using [Keyboard Layout Editor](https://www.keyboard-layout-editor.com), import it and recreate the matrix (if not already done as part of [planning the matrix](#planning-the-matrix).
|
||||
Simple firmware can be created easily using the [Keyboard Firmware Builder](https://kbfirmware.com/) website. Recreate your layout using [Keyboard Layout Editor](https://www.keyboard-layout-editor.com), import it and recreate the matrix (if not already done as part of [planning the matrix](#planning-the-matrix)).
|
||||
|
||||
Go through the rest of the tabs, assigning keys until you get to the last one where you can compile and download your firmware. The .hex file can be flashed straight onto your keyboard, or for advanced functionality, compiled locally after [Setting up Your Environment](newbs_getting_started.md).
|
||||
|
||||
|
@ -7,7 +7,7 @@ QMK tries to put a lot of power into your hands by making easy things easy, and
|
||||
Not sure if your keyboard can run QMK? If it's a mechanical keyboard you built yourself chances are good it can. We support a [large number of hobbyist boards](https://qmk.fm/keyboards/). If your current keyboard can't run QMK there are a lot of choices out there for boards that do.
|
||||
|
||||
?> **Is This Guide For Me?**<br>
|
||||
If the thought of programming intimidates you, please [take a look at our online GUI](newbs_building_firmware_configurator.md) instead.</div>
|
||||
If the thought of programming intimidates you, please [take a look at our online GUI](newbs_building_firmware_configurator.md) instead.
|
||||
|
||||
## Overview
|
||||
|
||||
|
@ -117,3 +117,77 @@ Using the [standard `compile_commands.json` database](https://clang.llvm.org/doc
|
||||
1. Start typing `clangd: Restart Language Server` and select it when it appears.
|
||||
|
||||
Now you're ready to code QMK Firmware in VS Code!
|
||||
|
||||
# Debugging ARM MCUs with Visual Studio Code
|
||||
|
||||
**...and a Black Magic Probe.**
|
||||
|
||||
Visual Studio Code has the ability to debug applications, but requires some configuration in order to get it to be able to do so for ARM targets.
|
||||
|
||||
This documentation describes a known-working configuration for setting up the use of a Black Magic Probe to debug using VS Code.
|
||||
|
||||
It is assumed that you've correctly set up the electrical connectivity of the Black Magic Probe with your MCU. Wiring up `NRST`, `SWDIO`, `SWCLK`, and `GND` should be enough.
|
||||
|
||||
Install the following plugin into VS Code:
|
||||
|
||||
* [Cortex-Debug](https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug) -
|
||||
This adds debugger support for ARM Cortex targets to VS Code.
|
||||
|
||||
A debugging target for the MCU for your board needs to be defined, and can be done so by adding the following to a `.vscode/launch.json` file:
|
||||
|
||||
```json
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Black Magic Probe (OneKey Proton-C)",
|
||||
"type": "cortex-debug",
|
||||
"request": "launch",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"executable": "${workspaceRoot}/.build/handwired_onekey_proton_c_default.elf",
|
||||
"servertype": "bmp",
|
||||
"BMPGDBSerialPort": "COM4",
|
||||
"svdFile": "Q:\\svd\\STM32F303.svd",
|
||||
"device": "STM32F303",
|
||||
"v1": false,
|
||||
"windows": {
|
||||
"armToolchainPath": "C:\\QMK_MSYS\\mingw64\\bin"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
You'll need to perform some modifications to the file above in order to target your specific device:
|
||||
|
||||
* `"name"`: Can be anything, but if you're debugging multiple targets you'll want something descriptive here.
|
||||
* `"cwd"`: The path to the QMK Firmware repository root directory -- _if using the `.vscode` directory existing in the `qmk_firmware` git repository, the default above should be correct_
|
||||
* `"executable"`: The path to the `elf` file generated as part of the build for your keyboard -- _exists in `<qmk_firmware>/.build`_
|
||||
* `"BMPGDBSerialPort"`: The `COM` port under Windows, or the `/dev/...` path for Linux/macOS. Two serial port devices will be created -- the Black Magic Probe debug port is *usually* the first. If it doesn't work, try the second.
|
||||
* `"svdFile"`: _[Optional]_ The path to the SVD file that defines the register layout for the MCU -- the appropriate file can be downloaded from the [cmsis-svd repository](https://github.com/posborne/cmsis-svd/tree/master/data/STMicro)
|
||||
* `"device"`: The name of the MCU, which matches the `<name>` tag at the top of the downloaded `svd` file.
|
||||
* `"armToolchainPath"`: _[Optional]_ The path to the ARM toolchain installation location on Windows -- under normal circumstances Linux/macOS will auto-detect this correctly and will not need to be specified.
|
||||
|
||||
!> Windows builds of QMK Firmware are generally compiled using QMK MSYS, and the path to gdb's location (`C:\\QMK_MSYS\\mingw64\\bin`) needs to be specified under `armToolchainPath` for it to be detected. You may also need to change the GDB path to point at `C:\\QMK_MSYS\\mingw64\\bin\\gdb-multiarch.exe` in the VSCode Cortex-Debug user settings: 
|
||||
|
||||
Optionally, the following modifications should also be made to the keyboard's `rules.mk` file to disable optimisations -- not strictly required but will ensure breakpoints and variable viewing works correctly:
|
||||
```makefile
|
||||
# Disable optimisations for debugging purposes
|
||||
LTO_ENABLE = no
|
||||
OPT = g
|
||||
DEBUG = 3
|
||||
```
|
||||
|
||||
At this point, you should build and flash your firmware through normal methods (`qmk compile ...` and `qmk flash ...`).
|
||||
|
||||
Once completed, you can:
|
||||
* Switch to the debug view in VS Code (in the sidebar, the Play button with a bug next to it)
|
||||
* Select the newly-created debug target in the dropdown at the top of the sidebar
|
||||
* Click the green play button next to the dropdown
|
||||
|
||||
VS Code's debugger will then start executing the compiled firmware on the MCU.
|
||||
|
||||
At this stage, you should have full debugging set up, with breakpoints and variable listings working!
|
||||
|
@ -9,6 +9,7 @@ If there are any inconsistencies with these recommendations, you're best off [cr
|
||||
- PR should be submitted using a non-`master` branch on the source repository
|
||||
- this does not mean you target a different branch for your PR, rather that you're not working out of your own master branch
|
||||
- if submitter _does_ use their own `master` branch, they'll be given a link to the ["how to git"](newbs_git_using_your_master_branch.md) page after merging -- (end of this document will contain the contents of the message)
|
||||
- Note, frequently merging upstream with your branch is not needed and is discouraged. Valid reason for updating your branch may be resolving merge conflicts and pulling in new changes relevant to your PR.
|
||||
- PRs should contain the smallest amount of modifications required for a single change to the codebase
|
||||
- multiple keyboards at the same time is not acceptable
|
||||
- **the smaller the PR, the higher likelihood of a quicker review, higher likelihood of quicker merge, and less chance of conflicts**
|
||||
@ -43,10 +44,10 @@ If there are any inconsistencies with these recommendations, you're best off [cr
|
||||
|
||||
- PRs for vendor specific keymaps will be permitted. The naming convention for these should be `default_${vendor}`, `via_${vendor}` i.e. `via_clueboard`.
|
||||
- vendor specific keymaps do not necessarily need to be "vanilla" and can be more richly featured than `default` or `via` stock keymaps.
|
||||
- #include QMK_KEYBOARD_H preferred to including specific board files
|
||||
- `#include QMK_KEYBOARD_H` preferred to including specific board files
|
||||
- prefer layer enums to #defines
|
||||
- custom keycode enums must have first entry = SAFE_RANGE
|
||||
- some care with spacing (e.g., alignment on commas or first char of keycodes) makes for a much nicer-looking keymap
|
||||
- custom keycode enums must have first entry = `QK_USER`
|
||||
- some care with spacing (e.g., alignment on commas or first char of keycodes) makes for a much nicer-looking keymap. Spaces are preferred to tabs
|
||||
|
||||
## Keyboard PRs
|
||||
|
||||
@ -81,6 +82,8 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
||||
- Encoder Configuration
|
||||
- Bootmagic Configuration
|
||||
- LED Indicator Configuration
|
||||
- RGB Light Configuration
|
||||
- RGB Matrix Configuration
|
||||
- Run `qmk format-json` on this file before submitting your PR. Be sure to append the `-i` flag to directly modify the file, or paste the outputted code into the file.
|
||||
- `readme.md`
|
||||
- must follow the [template](https://github.com/qmk/qmk_firmware/blob/master/data/templates/keyboard/readme.md)
|
||||
@ -90,8 +93,7 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
||||
- a picture about the keyboard and preferably about the PCB, too
|
||||
- images are not to be placed in the `qmk_firmware` repository
|
||||
- images should be uploaded to an external image hosting service, such as [imgur](https://imgur.com/).
|
||||
- if imgur is used, images should be resized appropriately: append "h" to the image url i.e. [https://i.imgur.com/vqgE7Ok.jpg](https://i.imgur.com/vqgE7Ok.jpg) becomes [https://i.imgur.com/vqgE7Ok**h**.jpg](https://i.imgur.com/vqgE7Okh.jpg)
|
||||
- image links should link directly to the image, not a "preview" -- i.e. [https://imgur.com/vqgE7Ok](https://imgur.com/vqgE7Ok) should be [https://i.imgur.com/vqgE7Okh.jpg](https://i.imgur.com/vqgE7Okh.jpg) when using imgur
|
||||
- image links should link directly to the image, not a "preview" -- i.e. [https://imgur.com/vqgE7Ok](https://imgur.com/vqgE7Ok) should be [https://i.imgur.com/vqgE7Ok.jpg](https://i.imgur.com/vqgE7Ok.jpg) when using imgur
|
||||
- `rules.mk`
|
||||
- removed `MIDI_ENABLE`, `FAUXCLICKY_ENABLE` and `HD44780_ENABLE`
|
||||
- modified `# Enable Bluetooth with the Adafruit EZ-Key HID` -> `# Enable Bluetooth`
|
||||
@ -146,6 +148,13 @@ https://github.com/qmk/qmk_firmware/pulls?q=is%3Apr+is%3Aclosed+label%3Akeyboard
|
||||
- For instance, only `wilba_tech` boards shall include `keyboards/wilba_tech/wt_main.c` and `keyboards/wilba_tech/wt_rgb_backlight.c`. But including `drivers/sensors/pmw3360.c` is absolutely fine for any and all boards that require it.
|
||||
- Code that needs to be used by multiple boards is a candidate for core code changes, and should be separated out.
|
||||
|
||||
Wireless-capable boards:
|
||||
- Given license abuse from vendors, QMK does not accept any vendor PRs for wireless- or Bluetooth-capable keyboards without wireless and/or Bluetooth code
|
||||
- Historically, vendors have done this in bad faith in order to attain downstream VIA compatibility with no intention of releasing wireless sources
|
||||
- QMK's license, the GPL2+, requires full source disclosure for any distributed binary -- including full sources for any keyboard shipped by vendors containing QMK and/or firmware-side VIA code
|
||||
- If a vendor's wireless-capable keyboard PR submission is lacking wireless capability, then the PR will be left on-hold and unmergeable until wireless bindings are provided
|
||||
- If a vendor's wireless-capable keyboard is merged into QMK before it's known that the board is wireless, then all existing and future PRs from the same vendor will be put on hold until wireless bindings for the offending keyboard are provided
|
||||
|
||||
Also, specific to ChibiOS:
|
||||
- **strong** preference to using existing ChibiOS board definitions.
|
||||
- a lot of the time, an equivalent Nucleo board can be used with a different flash size or slightly different model in the same family
|
||||
@ -204,7 +213,7 @@ Additionally, PR reviews are something that is done in our free time. We are not
|
||||
## Example GPLv2 Header
|
||||
|
||||
```
|
||||
/* Copyright 2021 Your Name (@yourgithub)
|
||||
/* Copyright 2024 Your Name (@yourgithub)
|
||||
*
|
||||
* 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
|
||||
@ -224,6 +233,6 @@ Additionally, PR reviews are something that is done in our free time. We are not
|
||||
Or, optionally, using [SPDX identifier](https://spdx.org/licenses/) instead:
|
||||
|
||||
```
|
||||
// Copyright 2021 Your Name (@yourgithub)
|
||||
// Copyright 2024 Your Name (@yourgithub)
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
```
|
||||
|
@ -1,6 +1,6 @@
|
||||
# 'serial' Driver
|
||||
|
||||
The serial driver powers the [Split Keyboard](feature_split_keyboard.md) feature. Several implementations are available, depending on the platform of your split keyboard. Note that none of the drivers support split keyboards with more than two halves.
|
||||
The Serial driver powers the [Split Keyboard](feature_split_keyboard.md) feature. Several implementations are available that cater to the platform and capabilites of MCU in use. Note that none of the drivers support split keyboards with more than two halves.
|
||||
|
||||
| Driver | AVR | ARM | Connection between halves |
|
||||
| --------------------------------------- | ------------------ | ------------------ | --------------------------------------------------------------------------------------------- |
|
||||
@ -14,7 +14,7 @@ The serial driver powers the [Split Keyboard](feature_split_keyboard.md) feature
|
||||
|
||||
## Bitbang
|
||||
|
||||
This is the Default driver, the absence of configuration assumes this driver. It works by [bit banging](https://en.wikipedia.org/wiki/Bit_banging) a GPIO pin using the CPU. It is therefore not as efficient as a dedicated hardware peripheral, which the Half-duplex and Full-duplex drivers use.
|
||||
This is the Default driver, absence of configuration assumes this driver. It works by [bit banging](https://en.wikipedia.org/wiki/Bit_banging) a GPIO pin using the CPU. It is therefore not as efficient as a dedicated hardware peripheral, which the Half-duplex and Full-duplex drivers use.
|
||||
|
||||
!> On ARM platforms the bitbang driver causes connection issues when using it together with the bitbang WS2812 driver. Choosing alternate drivers for both serial and WS2812 (instead of bitbang) is strongly recommended.
|
||||
|
||||
@ -31,7 +31,7 @@ This is the Default driver, the absence of configuration assumes this driver. It
|
||||
+-------+ +-------+
|
||||
```
|
||||
|
||||
One GPIO pin is needed for the bitbang driver, as only one wire is used for receiving and transmitting data. This pin is referred to as the `SOFT_SERIAL_PIN` (SSP) in the configuration. A simple TRS or USB cable provides enough conductors for this driver to work.
|
||||
One GPIO pin is needed for the bitbang driver, as only one wire is used for receiving and transmitting data. This pin is referred to as the `SOFT_SERIAL_PIN` (SSP) in the configuration. A TRS or USB cable provides enough conductors for this driver to function.
|
||||
|
||||
### Setup
|
||||
|
||||
@ -57,7 +57,7 @@ SERIAL_DRIVER = bitbang
|
||||
|
||||
## USART Half-duplex
|
||||
|
||||
Targeting ARM boards based on ChibiOS, where communication is offloaded to a USART hardware device that supports Half-duplex operation. The advantages over bitbanging are fast, accurate timings and reduced CPU usage. Therefore it is advised to choose this driver or the Full-duplex driver whenever possible.
|
||||
Targeting ARM boards based on ChibiOS, where communication is offloaded to a USART hardware device that supports Half-duplex operation. The advantages over bitbanging are fast, accurate timings and reduced CPU usage. Therefore it is advised to choose Half-duplex over Bitbang if MCU is capable of utilising Half-duplex, and Full-duplex can't be used instead (e.g. lack of available GPIO pins, or imcompatible PCB design).
|
||||
|
||||
### Pin configuration
|
||||
|
||||
@ -74,11 +74,13 @@ Targeting ARM boards based on ChibiOS, where communication is offloaded to a USA
|
||||
+-------+ +-------+
|
||||
```
|
||||
|
||||
Only one GPIO pin is needed for the Half-duplex driver, as only one wire is used for receiving and transmitting data. This pin is referred to as the `SERIAL_USART_TX_PIN` in the configuration. Take care that the pin you chose can act as the TX pin of the USART peripheral. A simple TRS or USB cable provides enough conductors for this driver to work. As the split connection is configured to work in open-drain mode, an **external pull-up resistor is needed to keep the line high**. Resistor values of 1.5kΩ to 8.2kΩ are known to work.
|
||||
Only one GPIO pin is needed for the Half-duplex driver, as only one wire is used for receiving and transmitting data. This pin is referred to as the `SERIAL_USART_TX_PIN` in the configuration. Ensure that the pin chosen for split communication can operate as the TX pin of the contoller's USART peripheral. A TRS or USB cable provides enough conductors for this driver to function. As the split connection is configured to operate in open-drain mode, an **external pull-up resistor is needed to keep the line high**. Resistor values of 1.5kΩ to 8.2kΩ are known to work.
|
||||
|
||||
!> ***Note:*** A pull-up resistor isn't required for RP2040 controllers configured with PIO subsystem.
|
||||
|
||||
### Setup
|
||||
|
||||
To use the Half-duplex driver follow these steps to activate it. If you target the Raspberry Pi RP2040 PIO implementation skip step 1.
|
||||
To use the Half-duplex driver follow these steps to activate it. If you target the Raspberry Pi RP2040 PIO implementation, start at step 2.
|
||||
|
||||
1. Change the `SERIAL_DRIVER` to `usart` in your keyboards `rules.mk` file:
|
||||
|
||||
@ -86,7 +88,9 @@ To use the Half-duplex driver follow these steps to activate it. If you target t
|
||||
SERIAL_DRIVER = usart
|
||||
```
|
||||
|
||||
2. (RP2040 PIO only!) Change the `SERIAL_DRIVER` to `vendor` in your keyboards `rules.mk` file:
|
||||
Skip to step 3.
|
||||
|
||||
2. (RP2040 + PIO only!) Change the `SERIAL_DRIVER` to `vendor` in your keyboards `rules.mk` file:
|
||||
|
||||
```make
|
||||
SERIAL_DRIVER = vendor
|
||||
@ -105,13 +109,13 @@ For STM32 MCUs several GPIO configuration options can be changed as well. See th
|
||||
#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
|
||||
```
|
||||
|
||||
4. Decide either for `SERIAL`, `SIO` or `PIO` subsystem, see the section ["Choosing a driver subsystem"](#choosing-a-driver-subsystem).
|
||||
4. Decide either for `SERIAL`, `SIO`, or `PIO` subsystem. See section ["Choosing a driver subsystem"](#choosing-a-driver-subsystem).
|
||||
|
||||
<hr>
|
||||
|
||||
## USART Full-duplex
|
||||
|
||||
Targeting ARM boards based on ChibiOS where communication is offloaded to an USART hardware device. The advantages over bitbanging are fast, accurate timings and reduced CPU usage. Therefore it is advised to choose this driver or the Full-duplex driver whenever possible. Due to its internal design it is slightly more efficient then the Half-duplex driver, but it should be primarily chosen if Half-duplex operation is not supported by the USART peripheral.
|
||||
Targeting ARM boards based on ChibiOS where communication is offloaded to an USART hardware device. The advantages over bitbanging are fast, accurate timings and reduced CPU usage; therefore it is advised to choose this driver over all others where possible. Due to its internal design Full-duplex is slightly more efficient than the Half-duplex driver, but Full-duplex should be primarily chosen if Half-duplex operation is not supported by the controller's USART peripheral.
|
||||
|
||||
### Pin configuration
|
||||
|
||||
@ -129,13 +133,13 @@ Targeting ARM boards based on ChibiOS where communication is offloaded to an USA
|
||||
+-------+ +-------+
|
||||
```
|
||||
|
||||
Two GPIO pins are needed for the Full-duplex driver, as two distinct wires are used for receiving and transmitting data. The pin transmitting data is the `TX` pin and refereed to as the `SERIAL_USART_TX_PIN`, the pin receiving data is the `RX` pin and refereed to as the `SERIAL_USART_RX_PIN` in this configuration. Please note that `TX` pin of the master half has to be connected with the `RX` pin of the slave half and the `RX` pin of the master half has to be connected with the `TX` pin of the slave half! Usually this pin swap has to be done outside of the MCU e.g. with cables or on the PCB. Some MCUs like the STM32F303 used on the Proton-C allow this pin swap directly inside the MCU. A simple TRRS or USB cable provides enough conductors for this driver to work.
|
||||
Two GPIO pins are needed for the Full-duplex driver, as two distinct wires are used for receiving and transmitting data. The pin transmitting data is the `TX` pin and refereed to as the `SERIAL_USART_TX_PIN`, the pin receiving data is the `RX` pin and refereed to as the `SERIAL_USART_RX_PIN` in this configuration. Please note that `TX` pin of the master half has to be connected with the `RX` pin of the slave half and the `RX` pin of the master half has to be connected with the `TX` pin of the slave half! Usually this pin swap has to be done outside of the MCU e.g. with cables or on the PCB. Some MCUs like the STM32F303 used on the Proton-C allow this pin swap directly inside the MCU. A TRRS or USB cable provides enough conductors for this driver to function.
|
||||
|
||||
To use this driver the usart peripherals `TX` and `RX` pins must be configured with the correct Alternate-functions. If you are using a Proton-C everything is already setup, same is true for STM32F103 MCUs. For MCUs which are using a modern flexible GPIO configuration you have to specify these by setting `SERIAL_USART_TX_PAL_MODE` and `SERIAL_USART_RX_PAL_MODE`. Refer to the corresponding datasheets of your MCU or find those settings in the section ["Alternate Functions for selected STM32 MCUs"](#alternate-functions-for-selected-stm32-mcus).
|
||||
To use this driver the USART peripherals `TX` and `RX` pins must be configured with the correct Alternate-functions. If you are using a Proton-C development board everything is already setup, same is true for STM32F103 MCUs. For MCUs which are using a modern flexible GPIO configuration you have to specify these by setting `SERIAL_USART_TX_PAL_MODE` and `SERIAL_USART_RX_PAL_MODE`. Refer to the corresponding datasheets of your MCU or find those settings in the section ["Alternate Functions for selected STM32 MCUs"](#alternate-functions-for-selected-stm32-mcus).
|
||||
|
||||
### Setup
|
||||
|
||||
To use the Full-duplex driver follow these steps to activate it. If you target the Raspberry Pi RP2040 PIO implementation skip step 1.
|
||||
To use the Full-duplex driver follow these steps to activate it. If you target the Raspberry Pi RP2040 PIO implementation, start at step 2
|
||||
|
||||
1. Change the `SERIAL_DRIVER` to `usart` in your keyboards `rules.mk` file:
|
||||
|
||||
@ -143,7 +147,9 @@ To use the Full-duplex driver follow these steps to activate it. If you target t
|
||||
SERIAL_DRIVER = usart
|
||||
```
|
||||
|
||||
2. (RP2040 PIO only!) Change the `SERIAL_DRIVER` to `vendor` in your keyboards `rules.mk` file:
|
||||
Skip to step 3
|
||||
|
||||
2. (RP2040 + PIO only!) Change the `SERIAL_DRIVER` to `vendor` in your keyboards `rules.mk` file:
|
||||
|
||||
```make
|
||||
SERIAL_DRIVER = vendor
|
||||
@ -165,7 +171,7 @@ For STM32 MCUs several GPIO configuration options, including the ability for `TX
|
||||
#define SERIAL_USART_TX_PAL_MODE 7 // Pin "alternate function", see the respective datasheet for the appropriate values for your MCU. default: 7
|
||||
```
|
||||
|
||||
1. Decide either for `SERIAL`, `SIO` or `PIO` subsystem, see the section ["Choosing a driver subsystem"](#choosing-a-driver-subsystem).
|
||||
4. Decide either for `SERIAL`, `SIO`, or `PIO` subsystem. See section ["Choosing a driver subsystem"](#choosing-a-driver-subsystem).
|
||||
|
||||
<hr>
|
||||
|
||||
@ -225,7 +231,7 @@ Just below `#include_next <mcuconf.h>` add:
|
||||
|
||||
Where 'n' matches the peripheral number of your selected USART on the MCU.
|
||||
|
||||
3. In you keyboards `config.h`: override the default USART `SIO` driver if you use a USART peripheral that does not belong to the default selected `SIOD1` driver. For instance, if you selected `STM32_SERIAL_USE_USART3` the matching driver would be `SIOD3`.
|
||||
3. In the keyboard's `config.h` file: override the default USART `SIO` driver if you use a USART peripheral that does not belong to the default selected `SIOD1` driver. For instance, if you selected `STM32_SERIAL_USE_USART3` the matching driver would be `SIOD3`.
|
||||
|
||||
```c
|
||||
#define SERIAL_USART_DRIVER SIOD3
|
||||
@ -233,9 +239,9 @@ Where 'n' matches the peripheral number of your selected USART on the MCU.
|
||||
|
||||
### The `PIO` driver
|
||||
|
||||
The `PIO` subsystem is a Raspberry Pi RP2040 specific implementation, using the integrated PIO peripheral and is therefore only available on this MCU. Because of the flexible nature of the PIO peripherals, **any** GPIO pin can be used as a `TX` or `RX` pin. Half-duplex and Full-duplex operation is fully supported. The Half-duplex operation mode uses the built-in pull-ups and GPIO manipulation on the RP2040 to drive the line high by default. An external pull-up is therefore not necessary.
|
||||
The `PIO` subsystem is a Raspberry Pi RP2040 specific implementation, using an integrated PIO peripheral and is therefore only available on this MCU. Because of the flexible nature of PIO peripherals, **any** GPIO pin can be used as a `TX` or `RX` pin. Half-duplex and Full-duplex operation modes are fully supported with this driver. Half-duplex uses the built-in pull-ups and GPIO manipulation of the RP2040 to drive the line high by default, thus an external pull-up resistor **is not required**.
|
||||
|
||||
You may optionally switch the PIO peripheral used with the following define in config.h:
|
||||
Optionally, the PIO peripheral utilized for split communication can be changed with the following define in config.h:
|
||||
```c
|
||||
#define SERIAL_PIO_USE_PIO1 // Force the usage of PIO1 peripheral, by default the Serial implementation uses the PIO0 peripheral
|
||||
```
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
AVR is severely resource-constrained, and as QMK continues to grow, it is approaching a point where support for AVR may need to be moved to legacy status as newer development is unable to fit into those constraints.
|
||||
|
||||
However, if you need to reduce the compiled size of your firmware, there are a number of options to do so.
|
||||
However, if you need to reduce the compiled size of your firmware to fit the controller's limited flash size, there are a number of options to do so.
|
||||
|
||||
## `rules.mk` Settings
|
||||
First and foremost is enabling link time optimization. To do so, add this to your rules.mk:
|
||||
@ -91,15 +91,19 @@ Or if you're not using layers at all, you can outright remove the functionality
|
||||
|
||||
There are two `__attribute__ ((weak))` placeholder functions available to customize magic keycodes. If you are not using that feature to swap keycodes, such as backslash with backspace, add the following to your `keymap.c` or user space code:
|
||||
```c
|
||||
#ifndef MAGIC_ENABLE
|
||||
uint16_t keycode_config(uint16_t keycode) {
|
||||
return keycode;
|
||||
}
|
||||
#endif
|
||||
```
|
||||
Likewise, if you are not using magic keycodes to swap modifiers, such as Control with GUI, add the following to your `keymap.c` or user space code:
|
||||
```c
|
||||
#ifndef MAGIC_ENABLE
|
||||
uint8_t mod_config(uint8_t mod) {
|
||||
return mod;
|
||||
}
|
||||
#endif
|
||||
```
|
||||
Both of them will overwrite the placeholder functions with a simple return statement to reduce firmware size.
|
||||
|
||||
@ -197,11 +201,7 @@ For RGB Matrix, these need to be explicitly enabled as well. To disable any that
|
||||
|
||||
# Final Thoughts
|
||||
|
||||
If you've done all of this, and your firmware is still too large, then it's time. It's time to consider making the switch to ARM. Unfortunately, right now is the worst possible time for that, due to the silicon shortage, and supply chain issues. Getting an ARM chip is difficult, at best, and significantly overpriced, at worst.
|
||||
-- Drashna
|
||||
|
||||
That said, there are a number of Pro Micro replacements with ARM controllers:
|
||||
* [Proton C](https://qmk.fm/proton-c/) (out of stock)
|
||||
If you've done all of this, and your firmware is still too large, then it is time to consider making the switch to ARM. There are a number of Pro Micro replacements with an ARM controller:
|
||||
* [Bonsai C](https://github.com/customMK/Bonsai-C) (Open Source, DIY/PCBA)
|
||||
* [STeMCell](https://github.com/megamind4089/STeMCell) (Open Source, DIY/PCBA)
|
||||
* [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040)
|
||||
@ -212,6 +212,7 @@ That said, there are a number of Pro Micro replacements with ARM controllers:
|
||||
* [Liatris](https://splitkb.com/products/liatris)
|
||||
* [Imera](https://splitkb.com/products/imera)
|
||||
* [Michi](https://github.com/ci-bus/michi-promicro-rp2040)
|
||||
* [Proton C](https://qmk.fm/proton-c/) (out of stock)
|
||||
|
||||
There are other, non-Pro Micro compatible boards out there. The most popular being:
|
||||
* [WeAct Blackpill F411](https://www.aliexpress.com/item/1005001456186625.html) (~$6 USD)
|
||||
|
46
keyboards/ah/haven60/haven60.c
Normal file
46
keyboards/ah/haven60/haven60.c
Normal file
@ -0,0 +1,46 @@
|
||||
/* Copyright 2023 CMM.S Freather
|
||||
*
|
||||
* 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"
|
||||
|
||||
const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 13, HSV_WHITE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t PROGMEM my_capsoff_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 1, HSV_BLACK}
|
||||
);
|
||||
|
||||
// Now define the array of layers. Later layers take precedence
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||
my_capslock_layer,
|
||||
my_capsoff_layer
|
||||
);
|
||||
|
||||
|
||||
void keyboard_post_init_kb(void){
|
||||
rgblight_layers = my_rgb_layers;
|
||||
keyboard_post_init_user();
|
||||
}
|
||||
|
||||
bool led_update_kb(led_t led_state){
|
||||
bool res = led_update_user(led_state);
|
||||
if (res) {
|
||||
rgblight_set_layer_state(0, led_state.caps_lock);
|
||||
rgblight_set_layer_state(1, !led_state.caps_lock);
|
||||
}
|
||||
return res;
|
||||
}
|
699
keyboards/ah/haven60/info.json
Normal file
699
keyboards/ah/haven60/info.json
Normal file
File diff suppressed because it is too large
Load Diff
21
keyboards/ah/haven60/keymaps/default/keymap.c
Normal file
21
keyboards/ah/haven60/keymaps/default/keymap.c
Normal file
@ -0,0 +1,21 @@
|
||||
// Copyright 2023 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[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_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL
|
||||
),
|
||||
[1] = LAYOUT_all(
|
||||
KC_GRV, 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_UP, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
21
keyboards/ah/haven60/keymaps/via/keymap.c
Normal file
21
keyboards/ah/haven60/keymaps/via/keymap.c
Normal file
@ -0,0 +1,21 @@
|
||||
// Copyright 2023 QMK
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[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_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL
|
||||
),
|
||||
[1] = LAYOUT_all(
|
||||
KC_GRV, 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_UP, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
1
keyboards/ah/haven60/keymaps/via/rules.mk
Normal file
1
keyboards/ah/haven60/keymaps/via/rules.mk
Normal file
@ -0,0 +1 @@
|
||||
VIA_ENABLE = yes
|
28
keyboards/ah/haven60/readme.md
Normal file
28
keyboards/ah/haven60/readme.md
Normal file
@ -0,0 +1,28 @@
|
||||
# haven60
|
||||
|
||||

|
||||
|
||||
Haven60 PCB for Atelier Haven Haven60% keyboard
|
||||
both hotswap and solder pcbs use same firmware
|
||||
|
||||
* Keyboard Maintainer: [Freather](https://github.com/Freather)
|
||||
* Hardware Supported: atmega32u4-mu
|
||||
* Hardware Availability: keyspensory.store
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make ah/haven60:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make ah/haven60: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 3 ways:
|
||||
|
||||
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
|
||||
* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead
|
||||
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user